import { _decorator, Component, instantiate, tween, Vec3, Node} from 'cc';
import { PlayerManager } from "./PlayerManager";
import { HandCard } from "./HandCard";
import { MyHandCard } from "./MyHandCard";

const { ccclass, property } = _decorator;
const maxCard = 13;

@ccclass('TouchCard') // 用 @ccclass 声明类为 Cocos 组件
export class TouchCard extends Component {

    public anchorX: number = 0;

    onLoad(): void {

    }

    start()
    {

    }

    onCardClick(event: Event, customEventData: string): void {
        console.log("onCardClick...", customEventData);

        const player = PlayerManager.instance.getSelf();
        if(player)
        {
            player.clickCard(parseInt(customEventData));
        }
    }

}